public class LabelCommand
extends java.lang.Object
限定符和类型 | 类和说明 |
---|---|
static class |
LabelCommand.BARCODETYPE |
static class |
LabelCommand.BITMAP_MODE |
static class |
LabelCommand.CODEPAGE |
static class |
LabelCommand.DENSITY |
static class |
LabelCommand.DIRECTION |
static class |
LabelCommand.EEC |
static class |
LabelCommand.FONTMUL |
static class |
LabelCommand.FONTTYPE |
static class |
LabelCommand.FOOT |
static class |
LabelCommand.MIRROR |
static class |
LabelCommand.READABEL |
static class |
LabelCommand.ROTATION |
static class |
LabelCommand.SPEED |
构造器和说明 |
---|
LabelCommand() |
LabelCommand(int width,
int height,
int gap)
构造函数说明:初始化标签,设置标签尺寸 单位 mm
|
限定符和类型 | 方法和说明 |
---|---|
void |
add1DBarcode(int x,
int y,
LabelCommand.BARCODETYPE type,
int height,
LabelCommand.READABEL readable,
LabelCommand.ROTATION rotation,
int narrow,
int width,
java.lang.String content)
方法说明:在标签上绘制一维条码
|
void |
add1DBarcode(int x,
int y,
LabelCommand.BARCODETYPE type,
int height,
LabelCommand.READABEL readable,
LabelCommand.ROTATION rotation,
java.lang.String content)
方法说明:在标签上绘制一维条码
|
void |
addBackFeed(int dot)
方法说明:退纸 单位为dot 1mm为8dot
|
void |
addBar(int x,
int y,
int width,
int height)
方法说明:在标签上画线
|
void |
addBitmap(int x,
int y,
LabelCommand.BITMAP_MODE mode,
int nWidth,
android.graphics.Bitmap b)
方法说明:在标签上绘制图片
|
void |
addBox(int x,
int y,
int xend,
int yend,
int thickness)
方法说明:在标签上绘制黑块
|
void |
addCashdrwer(LabelCommand.FOOT m,
int t1,
int t2)
方法说明:打开钱箱命令
|
void |
addCls()
方法说明:清除打印缓冲区
|
void |
addCodePage(LabelCommand.CODEPAGE page)
方法说明:设置蜂鸣器
|
void |
addCutter(EscCommand.ENABLE enable)
方法说明:设置切刀是否有效
|
void |
addCutterBatch()
打印到最后一张切纸
|
void |
addCutterPieces(short number)
设置打印几张后切纸,如果调用addPrint的打印份数小于number,则不会进行切纸
|
void |
addDensity(LabelCommand.DENSITY density)
方法说明:设置打印浓度
|
void |
addDirection(LabelCommand.DIRECTION direction,
LabelCommand.MIRROR mirror)
方法说明:设置打印方向
|
void |
addErase(int x,
int y,
int xwidth,
int yheight)
方法说明:该指令用于清除影像缓冲区部份区域的数据
|
void |
addFeed(int dot)
方法说明:进纸 单位为dot 1mm为8dot
|
void |
addFormFeed()
方法说明:走一张标签
|
void |
addGap(int gap)
方法说明:设置标签间隙尺寸 单位mm
|
void |
addHome()
方法说明:校准标签纸
|
void |
addLimitFeed(int n)
方法说明 :该指令用于设定打印机进纸时,若经过所设定的长度仍无法侦测到垂直间距, 则打印机发生错误,停止进纸
|
void |
addOffset(int offset)
方法说明:设置剥离模式下标签停止的位置 单位mm
|
void |
addPartialCutter(EscCommand.ENABLE enable)
方法说明:设置切刀半切是否有效
|
void |
addPeel(EscCommand.ENABLE enable)
方法说明:设置打印机剥离模式
|
void |
addPrint(int m)
方法说明:执行打印
|
void |
addPrint(int m,
int n)
方法说明:执行打印
|
void |
addPrintKey(EscCommand.ENABLE enable)
方法说明:设置是否按键打印有效
|
void |
addPrintKey(int m)
方法说明:设置按键打印份数
|
void |
addQRCode(int x,
int y,
LabelCommand.EEC level,
int cellwidth,
LabelCommand.ROTATION rotation,
java.lang.String data)
方法说明:该指令用于清除影像缓冲区部份区域的数据
|
void |
addQueryPrinterCodePage()
方法说明:查询打印机代码页
|
void |
addQueryPrinterFile()
方法说明:查询打印机存储文档
|
void |
addQueryPrinterLife()
方法说明:查询打印机已打印里程
|
void |
addQueryPrinterMemory()
方法说明:查询打印机内存
|
void |
addQueryPrinterStatus()
方法说明:查询打印机状态
|
void |
addQueryPrinterType()
方法说明 :查询打印机型号
|
void |
addReference(int x,
int y)
方法说明:设置标签原点坐标
|
void |
addReprint(EscCommand.ENABLE enable)
方法说明:设置出现错误时是否打印上一张内容
|
void |
addResetPrinter()
方法说明:打印机复位
|
void |
addReverse(int x,
int y,
int xwidth,
int yheight)
方法说明:该指令用于清除影像缓冲区部份区域的数据
|
void |
addSelfTest()
方法说明:打印自检页
|
void |
addShif(int shift)
方法说明:设置标签偏移距离 单位mm
|
void |
addSize(int width,
int height)
方法说明:设置标签尺寸的宽和高
|
void |
addSound(int level,
int interval)
方法说明:设置蜂鸣器
|
void |
addSpeed(LabelCommand.SPEED speed)
方法说明:设置打印速度
|
void |
addTear(EscCommand.ENABLE enable)
方法说明:设置打印机撕离模式
|
void |
addText(int x,
int y,
LabelCommand.FONTTYPE font,
LabelCommand.ROTATION rotation,
LabelCommand.FONTMUL Xscal,
LabelCommand.FONTMUL Yscal,
java.lang.String text)
方法说明:在标签上绘制文字
|
void |
addUserCommand(java.lang.String command) |
void |
clrCommand()
方法说明:清除命令缓冲区
|
java.util.Vector<java.lang.Byte> |
getCommand()
方法说明:获得打印命令
|
public LabelCommand()
public LabelCommand(int width, int height, int gap)
width
- 标签宽度height
- 标签高度gap
- 标签间隙public void clrCommand()
public void addGap(int gap)
gap
- 间隙长度public void addSize(int width, int height)
width
- 标签宽度height
- 标签高度public void addCashdrwer(LabelCommand.FOOT m, int t1, int t2)
m
- 钱箱号t1
- 高电平时间t2
- 低电平时间public void addOffset(int offset)
offset
- 偏移量public void addSpeed(LabelCommand.SPEED speed)
speed
- 打印速度public void addDensity(LabelCommand.DENSITY density)
density
- 浓度public void addDirection(LabelCommand.DIRECTION direction, LabelCommand.MIRROR mirror)
direction
- 方向public void addReference(int x, int y)
x
- 横坐标y
- 纵坐标public void addShif(int shift)
shift
- 偏移量public void addCls()
public void addFeed(int dot)
dot
- 进制距离public void addBackFeed(int dot)
dot
- 退纸距离public void addFormFeed()
public void addHome()
public void addPrint(int m, int n)
m
- n
- public void addPrint(int m)
m
- n
- public void addCodePage(LabelCommand.CODEPAGE page)
level
- 频率interval
- 时间public void addSound(int level, int interval)
level
- 频率interval
- 时间public void addLimitFeed(int n)
n
- 单位为dotpublic void addSelfTest()
public void addBar(int x, int y, int width, int height)
x
- 横坐标y
- 纵坐标width
- 线宽height
- 线高public void addText(int x, int y, LabelCommand.FONTTYPE font, LabelCommand.ROTATION rotation, LabelCommand.FONTMUL Xscal, LabelCommand.FONTMUL Yscal, java.lang.String text)
x
- 横坐标y
- 纵坐标font
- 字体类型rotation
- 旋转角度Xscal
- 横向放大Yscal
- 纵向放大text
- 文字字符串public void add1DBarcode(int x, int y, LabelCommand.BARCODETYPE type, int height, LabelCommand.READABEL readable, LabelCommand.ROTATION rotation, java.lang.String content)
x
- 横坐标y
- 纵坐标type
- 条码类型height
- 条码高度readable
- 是否可识别rotation
- 旋转角度content
- 条码内容public void add1DBarcode(int x, int y, LabelCommand.BARCODETYPE type, int height, LabelCommand.READABEL readable, LabelCommand.ROTATION rotation, int narrow, int width, java.lang.String content)
x
- 横坐标y
- 纵坐标type
- 条码类型height
- 条码高度readable
- 是否可识别rotation
- 旋转角度content
- 条码内容public void addBox(int x, int y, int xend, int yend, int thickness)
x
- 起始横坐标y
- 起始横坐标xend
- 终点横坐标yend
- 终点纵坐标public void addBitmap(int x, int y, LabelCommand.BITMAP_MODE mode, int nWidth, android.graphics.Bitmap b)
x
- 起始横坐标y
- 起始纵坐标mode
- 模式bmp
- 图片数据public void addErase(int x, int y, int xwidth, int yheight)
x
- 起始横坐标y
- 起始横坐标xend
- 终点横坐标yend
- 终点纵坐标public void addReverse(int x, int y, int xwidth, int yheight)
x
- 起始横坐标y
- 起始横坐标xend
- 终点横坐标yend
- 终点纵坐标public void addQRCode(int x, int y, LabelCommand.EEC level, int cellwidth, LabelCommand.ROTATION rotation, java.lang.String data)
x
- 起始横坐标y
- 起始横坐标xend
- 终点横坐标yend
- 终点纵坐标public java.util.Vector<java.lang.Byte> getCommand()
public void addQueryPrinterType()
public void addQueryPrinterStatus()
public void addResetPrinter()
public void addQueryPrinterLife()
public void addQueryPrinterMemory()
public void addQueryPrinterFile()
public void addQueryPrinterCodePage()
public void addPeel(EscCommand.ENABLE enable)
enable
- 是否开启public void addTear(EscCommand.ENABLE enable)
enable
- 是否开启public void addCutter(EscCommand.ENABLE enable)
enable
- 是否开启public void addCutterBatch()
public void addCutterPieces(short number)
number
- 打印几张纸后切纸 0 <= number <= 65535public void addReprint(EscCommand.ENABLE enable)
enable
- 是否开启public void addPrintKey(EscCommand.ENABLE enable)
enable
- 是否开启public void addPrintKey(int m)
enable
- 是否开启public void addPartialCutter(EscCommand.ENABLE enable)
enable
- 是否开启public void addUserCommand(java.lang.String command)